package com.example.vlille2.accueil;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.util.Log;
import android.view.View;

import com.example.vlille2.R;
import com.example.vlille2.apropos.AProposActivity;
import com.example.vlille2.base.StationsBDD;
import com.example.vlille2.carte.CarteActivity;
import com.example.vlille2.contact.ContactActivity;
import com.example.vlille2.favoris.FavorisActivity;
import com.example.vlille2.parser.ParserService;
import com.example.vlille2.proximite.ProximiteActivity;
import com.example.vlille2.recherche.RechercheActivity;

public class AccueilActivity extends Activity {
	
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		
		setContentView(R.layout.layout_accueil);
		
		startService(new Intent(this,ParserService.class));
		StationsBDD.initInstance(getApplicationContext());
	}

	@Override
	protected void onDestroy() {
		stopService(new Intent(this,ParserService.class));
		super.onDestroy();
	}

	public void clic_proximite(View vue)
	{
		Intent intent = new Intent(AccueilActivity.this,ProximiteActivity.class);
		startActivity(intent);
	}

	public void clic_favoris(View vue)
	{
		Intent intent = new Intent(AccueilActivity.this,FavorisActivity.class);
		startActivity(intent);
	}

	public void clic_carte(View vue)
	{
		Intent intent = new Intent(AccueilActivity.this,CarteActivity.class);
		startActivity(intent);
	}

	public void clic_recherche(View vue)
	{
		Intent intent = new Intent(AccueilActivity.this,RechercheActivity.class);
		startActivity(intent);
	}

	public void clic_contact(View vue)
	{
		Intent intent = new Intent(AccueilActivity.this,ContactActivity.class);
		startActivity(intent);
	}

	public void clic_apropos(View vue)
	{
		Intent intent = new Intent(AccueilActivity.this,AProposActivity.class);
		startActivity(intent);
	}


}
